<?php
namespace App\Model\Table;

use Cake\ORM\Table;

class TasksTable extends Table {
    public function initialize(array $config){
        $this->table('tasks');
        $this->hasMany(
            'TaskOwners',[
                'className' => 'TaskOwners',
                'foreignKey' => 'task_id'
            ]);
        $this->hasOne(
            'TaskOwners', [
                'className' => 'TaskOwners',
                'foreignKey' => 'task_id'
            ]);
    }
}
?>